import { FC, useCallback, useEffect, useState, PropsWithChildren } from "react";
import axios from "axios";

import Item from "../../component/center_item";
const All: FC = () => {
  const [listarr, setlistarr] = useState<any>([]);
  useEffect(() => {
    axios.get("https://api.blog.wipi.tech/api/article").then((res) => {
      console.log(res.data.data);
      setlistarr(res.data.data);
    });
  }, []);
  return (
    <div>
      {listarr[0] &&
        listarr[0].map((item, i) => {
          return <Item item={item}></Item>;
        })}
    </div>
  );
};
export default All;
